<%--
  Created by IntelliJ IDEA.
  User: shadowtu
  Date: 2018/11/26
  Time: 18:05
  To change this template use File | Settings | File Templates.
--%>
<%--销售机会指派页面--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <link rel="stylesheet" href="/static/commons/layui/css/layui.css" />
    <%--<link rel="stylesheet" href="/static/commons/layui/css/modules/laydate/default/laydate.css" />--%>
</head>
<body class="childrenBody">
<form class="layui-form" id="editForm">

    <div class="layui-inline">
        <div class="layui-input-inline">
            <div class="layui-form-item">
                <label class="layui-form-label layui-bg-green layui-center">编号</label>
                <div class="layui-input-block">
                    <input type="text" name="id" class="layui-input id"  readonly/>
                </div>
            </div>
        </div>
        <div class="layui-input-inline">
            <div class="layui-form-item">
                <label class="layui-form-label layui-bg-green layui-center">机会来源</label>
                <div class="layui-input-block">
                    <input type="text" name="opportunitySource" class="layui-input opportunitySource"readonly />
                </div>
            </div>
        </div>
    </div>

    <div class="layui-inline">
        <div class="layui-input-inline">
            <div class="layui-form-item">
                <label class="layui-form-label layui-bg-green layui-center">客户名称</label>
                <div class="layui-input-block">
                    <input type="text" name="sname" class="layui-input sname" readonly/>
                </div>
            </div>
        </div>
        <%--<div class="layui-form-item">--%>
        <%--<label class="layui-form-label layui-bg-green layui-center">客户</label>--%>
        <%--<div class="layui-input-block">--%>
        <%--<select name="sname" lay-verify="required" lay-search id="customerNameSelect">--%>
        <%--<option value="">请选择</option>--%>
        <%--</select>--%>
        <%--</div>--%>
        <%--</div>--%>

    </div>
    <div class="layui-form-item">
        <label class="layui-form-label layui-bg-green layui-center">概要</label>
        <div class="layui-input-block">
            <input type="text" name="outline" class="layui-input outline" readonly style="width: 80%;" />
        </div>
    </div>
    <div class="layui-inline">
        <div class="layui-input-inline">
            <div class="layui-form-item">
                <label class="layui-form-label layui-bg-green layui-center">联系人</label>
                <div class="layui-input-block">
                    <input type="text" name="contacts" class="layui-input contacts" readonly />
                </div>
            </div>
        </div>
        <div class="layui-input-inline">
            <div class="layui-form-item">
                <label class="layui-form-label layui-bg-green layui-center">联系电话</label>
                <div class="layui-input-block">
                    <input type="text" name="contactsTel" class="layui-input contactsTel" readonly/>
                </div>
            </div>
        </div>
    </div>


    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label layui-bg-green layui-center">机会描述</label>
        <div class="layui-input-block">
            <textarea name="opportunityDesc" placeholder="请输入内容" class="layui-textarea opportunityDesc" readonly style="width: 80%;"></textarea>
        </div>
    </div>

    <div class="layui-inline">
        <div class="layui-input-inline">
            <div class="layui-form-item">
                <label class="layui-form-label layui-bg-green layui-center">创建人</label>
                <div class="layui-input-block">
                    <input type="text" name="assignName" class="layui-input assignName" readonly/>
                </div>
            </div>
        </div>
        <div class="layui-input-inline">
            <div class="layui-form-item">
                <label class="layui-form-label layui-bg-green layui-center">创建时间</label>
                <div class="layui-input-block">
                    <input type="text" name="creationTime" class="layui-input creationTime " readonly/>
                </div>
            </div>
        </div>
    </div>

    <%--<div class="layui-inline">--%>
    <%--<div class="layui-input-inline">--%>
    <%--<div class="layui-form-item">--%>
    <%--<label class="layui-form-label layui-bg-green layui-center">指派人</label>--%>
    <%--<div class="layui-input-block">--%>
    <%--<input type="text" name="foundName" class="layui-input foundName"readonly/>--%>
    <%--</div>--%>
    <%--</div>--%>
    <%--</div>--%>

    <div class="layui-form-item">
        <label class="layui-form-label layui-bg-green layui-center">指派人</label>
        <div class="layui-input-block ">
            <select name="foundName" lay-verify="required" lay-search id="customerNameSelect">
                <option value="">请选择</option>
            </select>
        </div>
    </div>
    <%--<div class="layui-inline">--%>
    <%--<div class="layui-input-inline">--%>
    <%--<div class="layui-form-item">--%>
    <%--<label class="layui-form-label layui-bg-green layui-center">指派时间</label>--%>
    <%--<div class="layui-input-block">--%>
    <%--<input type="text" name="pointTime" class="layui-input pointTime"/>--%>
    <%--</div>--%>
    <%--</div>--%>
    <%--</div>--%>
    <div class="layui-input-inline">
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label layui-bg-green layui-center">指派时间</label>
                <div class="layui-input-inline ">
                    <%--<input id="pointTime" name="pointTime" class="layui-input" type="text">--%>
                    <input type="text" id="pointTime" name="pointTime" lay-verify="date" placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input pointTime">
                </div>
            </div>
        </div>
    </div>
    </div>
    </div>
</form>
<%--<script>--%>
<%--layui.use(['laydata'],function() {--%>
<%--let layda;--%>
<%--layda = layui.laydate;--%>
<%--layda.render({--%>
<%--elem: '#pointTime'--%>
<%--, min: -7--%>
<%--, max: 7--%>
<%--});--%>

<%--});--%>
<%--</script>--%>
<script type="text/javascript" src="/static/commons/layui/layui.js" ></script>
<%--script type="text/javascript" src="../../static/commons/layui/lay/modules/laydate.js" ></script>--%>
<script type="text/javascript" src="/static/js/salesOpportunity/opportunityChance.js" ></script>

</body>
<script>
    layui.use(['jquery','form'],function () {
        let $=layui.jquery,
            form=layui.form;

        $.get("/sales-opportunity/user",function (data) {
            data.data.users.forEach(function(user)
            {
                $("#customerNameSelect").append("<option value='" + user.name + "'>" + user.name + "</option>");

            });
            form.render('select');
        });

    });


</script>
</html>
